const express = require('express')
    // 创建路由对象
const router = express.Router()
    // 导入用户路由处理函数模块
const declerkListHandler = require('../router_handler/declerk')

const { reg_declerk_schema } = require('../schema/manager')
const expressJoi = require('@escook/express-joi')
    //获取骑手列表
router.get('/declerks', declerkListHandler.getDeclerksList)
    //根据id查询骑手手信息
router.get('/declerks/:id', declerkListHandler.searchDeclerkById)

//编辑骑手
router.put("/declerks/:id", expressJoi(reg_declerk_schema), declerkListHandler.editDeclerkById)

router.delete('/declerks/:id', declerkListHandler.deletedeclerk)


module.exports = router